import {Component, ViewChild} from "@angular/core";
import { NavController } from "ionic-angular";
import { CurdService } from "../../../../shared/models/services/curd.service";
import { RoleStatus } from "../../../../shared/models/role.status";
import { HttpService } from 'http-service';

declare var window: {
  localStorage: {
    getItem: any,
  }
};

@Component({
    selector: 'page-home',
    templateUrl: 'home.page.html'
})
export class HomePage {
  role: string;
  marketing: RegExp;
  producer: RegExp;
  arrearsNum: number = 0;
  resumptionNumber: number = 0;
  inspectionTaskNum: number = 0;
  @ViewChild('homeCards') homeCards: any;
  constructor(
      public curdService: CurdService,
      public navCtrl: NavController,
      public httpService: HttpService,
  ) {
    this.role =  window.localStorage.getItem('role');
    this.marketing = new RegExp(RoleStatus.marketing);
    this.producer = new RegExp(RoleStatus.producer);
  }


  ionViewDidEnter() {
    // this.homeCards.update();
  }


}
